﻿
#if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX)
#define DISABLESTEAMWORKS
#endif
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class BattleLevel4 : BattleLevel
{
    public Ship ProtectShip;
    public Text m_TimeCountL;
    public float m_TimeCountMax = 120;
    float m_TimeCount = 0;

    private void Awake()
    {
    }

    override protected void Update()
    {
        base.Update();
        m_TimeCount += Time.deltaTime;
        m_TimeCountL.text = m_TimeCount.ToString("F2") + "/" + m_TimeCountMax+"秒";

        if(m_TimeCount >= m_TimeCountMax)
        {
            OnSucceed();
        }
    }
    protected override void CheckComplete()
    {
        base.CheckComplete();
        if (ProtectShip == null )
        {
            OnLose();
            return;
        }
    }
    public override void OnSucceed()
    {
        base.OnSucceed();
    }
}
